package demo.employee;

import java.util.Comparator;

public class EmployeeSalComparator implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Employee emp1 = (Employee) o1;
        Employee emp2 = (Employee) o2;
        return Double.compare(emp1.getSalary(),emp2.getSalary());
    }
}
